LLM Sentiment

Add an LLM Sentiment node to your Data Flow. This node causes the LLM to asses the values in a selected column and assign each a "sentiment"; that is, a rating that records whether the content of the original comment is positive, negative, neutral (does not indicate a particular sentiment), or mixed. The sentiment value is generated automatically using the Model's LLM and added to a new column.

Note: It is important to note that any of the Generative Artificial Intelligence (Gen-AI) nodes could potentially create a performance overhead, depending on the size of your model. You should, therefore, consider the inclusion of these nodes carefully, and perhaps configure your Sync Model settings with reference to your requirements. For more information, see Data Flow Ribbon.

Add an LLM Sentiment node

This task is part of a "data preparation" or "transformation" stage that lets you cleanse and improve your data before you write it to your target database.

Before you begin

You should have a Data Flow that includes at least one datasource and one or more Tables. You are going to generate a new sentiment "rating" based on an assessment of one of the table's columns, creating a new column to store the sentiment.

If you do not have permission to add this type of node, you will not see the Gen-AI options in the Data Flow > Elements list.

Procedure

From the Data Flow page in Model Pro:

  1. Click Gen-AI in the left-hand menu and, from the sub-menu, drag-and-drop LLM Sentiment onto the canvas.
  2. Connect the Table that contains the column you want to generate a sentiment for to the LLM Sentiment node.
  3. Note: The connection is created by selecting the "end connector" (red arrow) on the preceding node (in this case, the Table node) and then dragging your cursor to the "start connector" (blue box) on the LLM Sentiment node.

  4. Select LLM Sentiment and, from the Properties panel, set:
    • Select Column: Select the name of the Column that you want to generate a sentiment for.
    • New Column Name: By default, the name Sentiment is supplied for the new column.
  5. Click Preview (the two buttons are shown with green arrows in the following example) and check that your sentiment column is created as you expect in the Preview panel.
  6. Notes:

    • The preview creates a fixed number of rows (50 by default). To increase the number of rows, change the Preview Size option. For more information, see Datasource Preview.

  7. Click Save at any time to save your changes.

You can now continue building your Data Flow as usual.

What next?

You may either want to continue processing your data or add a Target to your Data Flow at this point. The Target is the database that you want to use to store your processed data.

Example: LLM Sentiment

Note: In this example, the LLM Sentiment node is used to gauge the sentiment of the sentences generated using the LLM General node and written to the LLM Result column. You could do a sentiment analysis of the values in any column containing appropriate data. For more information, see LLM General.